import {
  Constant_Enum_Enum_DistributionApply_Status,
  Constant_Enum_Name_DistributionApply_Status,
  IConstant_Enum_Type_DistributionApply_Status,
} from '@/common/constants/enum';
import { Decorator_DtoIsNumber_Base } from '@/common/decorators/dtoIsNumber';
import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsOptional, IsString } from 'class-validator';

export class DistributionApply_Create_Dto {
  @IsString()
  @IsNotEmpty()
  @ApiProperty({ description: '联系方式' })
  daLinkWay: string;

  @IsString()
  @IsNotEmpty()
  @ApiProperty({ description: '备注' })
  daRemark: string;
}

export class DistributionApply_Find_Dto {
  @Decorator_DtoIsNumber_Base()
  @IsOptional()
  size?: number;

  @Decorator_DtoIsNumber_Base()
  @IsOptional()
  page?: number;

  @Decorator_DtoIsNumber_Base()
  @IsOptional()
  @ApiProperty({ description: '用户id' })
  userClientId?: number;

  @IsString()
  @IsOptional()
  @ApiProperty({ description: '用户昵称' })
  userClientName?: string;

  @IsString()
  @IsOptional()
  @ApiProperty({
    default: Constant_Enum_Enum_DistributionApply_Status.DistributionApply_Status_Processing,
    description: '申请状态' + Constant_Enum_Name_DistributionApply_Status,
    enum: Constant_Enum_Enum_DistributionApply_Status,
  })
  daStatus?: IConstant_Enum_Type_DistributionApply_Status;
}

export class DistributionApply_Pass_Dto {
  @Decorator_DtoIsNumber_Base()
  @IsNotEmpty()
  id: number;

  @IsString()
  @IsNotEmpty()
  @ApiProperty({
    default: Constant_Enum_Enum_DistributionApply_Status.DistributionApply_Status_Processing,
    description: '申请状态' + Constant_Enum_Name_DistributionApply_Status,
    enum: Constant_Enum_Enum_DistributionApply_Status,
  })
  daStatus: IConstant_Enum_Type_DistributionApply_Status;
}
